<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>js_dom练习01</title>
		<script type="text/javascript">
			//onmouseover事件响应的函数
			function doMouseOver(){
				//通过id获取img对象
				var img = document.getElementById("picture");
				//修改img对象的src属性值
				img.src="imgs/dog_2.jpg"
			}
			//onmouseout事件响应的函数
			function doMouseOut(){
				//通过id获取img对象
				var img = document.getElementById("picture");
				//修改img对象的src属性值
				img.src="imgs/dog_1.jpg";
			}
		</script>
	</head>
	<body>
		<a href="#">
			<img src="imgs/dog_1.jpg" id="picture" onmouseover="doMouseOver()" onmouseout="doMouseOut()"/>
		</a>
		<h1>试试把光标移到图片上</h1>
	</body>
</html>
